//
//  SetSysExitLoginTableViewCell.m
//  PYWGetColor
//
//  Created by 杜文杰 on 2018/6/17.
//  Copyright © 2018年 dwj. All rights reserved.
//

#import "SetSysExitLoginTableViewCell.h"
@interface SetSysExitLoginTableViewCell()

@end

@implementation SetSysExitLoginTableViewCell
- (void) buttonAction:(UIButton *)btn 
{
    NSLog(@"退出登录回调");
    if (self.exitBtnBlock) {
        self.exitBtnBlock();
    }
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.separatorInset = UIEdgeInsetsZero;
        
        UIButton *button = [[UIButton alloc] init];
        [button.titleLabel sizeToFit];
        [button setTitle:@"退出登录" forState:UIControlStateNormal];
        [button setTitleColor:getColor(mainColor) forState:UIControlStateNormal];
        button.titleLabel.font = DEF_FontSize_16;
        [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self.contentView addSubview:button];
        __weak typeof(self)weakself = self;
        [button mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.top.bottom.equalTo(weakself);
            
        }];
    }
    return self;
}

@end
